/**
 * @(#) ReguideFacade.as
 *
 * @date		2013. 03. 13.
 * @version		1.0
 * @author		pjt
 * @description	module facade (휴가/휴직제도 안내)
 * 				mvc간 주고 받는 메세지를 정의하고,  command를 등록한다.
 */
package com.skt.common_hr.reguide
{
	import com.skt.common_hr.common.puremvc.CommonFacade;
	import com.skt.common_hr.reguide.controller.StartupCommand;

	import flash.display.DisplayObject;

	public class ReguideFacade extends CommonFacade
	{
		public static const STARTUP:String 									= 'startup';
		public static const CLOSE_MODULE:String								= 'closeModule';


		public function ReguideFacade( key:String )
		{
			super(key);
		}

        /**
         * Singleton ApplicationFacade Factory Method
         */
        public static function getInstance( key:String ) : ReguideFacade
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ] = new ReguideFacade( key );
            return instanceMap[ key ] as ReguideFacade;
        }

        /**
         * Register Commands with the Controller
         *     - parent 클래스의 생성자에서 자동으로 호출됨
         */
        override protected function initializeController( ) : void {
            super.initializeController();
            registerCommand( STARTUP, StartupCommand);
        }

        /**
         * Module의 시작점으로 Bankreq.mxml의 creationComplete 이벤트에서 호출한다.
         *
         */
        public function startup(app:Object) :void
        {
        	trace("send startup in ReguideFacade.as");
        	this.app = app as DisplayObject;
            sendNotification( STARTUP, app );
        }

	}
}